﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPlus.Master" AutoEventWireup="true" CodeBehind="wbfrm_Facturacion_Matricula.aspx.cs" Inherits="FrontEndPlus.Módulos.Administración.wbfrm_Facturacion_Matricula" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="Stylesheet" href="css/Estilos.css" type="text/css" media="screen" />

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script src='<%=ResolveUrl("js/jquery.webcam.js") %>' type="text/javascript"></script>
    <link rel="Stylesheet" href="css/Estilos.css" type="text/css" media="screen" />
    <script type="text/javascript">
        var pageUrl = '<%=ResolveUrl("wbfrm_Facturacion_Matricula.aspx") %>';
        $(function () {
            jQuery("#webcam").webcam({
                width: 320,
                height: 240,
                mode: "save",
                swffile: '<%=ResolveUrl("js/jscam.swf") %>',
                debug: function (type, status) {
                    
                },
                onSave: function (data) {
                    $.ajax({
                        type: "POST",
                        url: pageUrl + "/GetCapturedImage",
                        data: '',
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (r) {
                            $("[id*=imgCapture]").css("visibility", "visible");
                            $("[id*=imgCapture]").attr("src", r.d);
                        },
                        failure: function (response) {
                            alert(response.d);
                        }
                    });
                },
                onCapture: function () {
                    webcam.save(pageUrl);
                }
            });
        });
        function Capture() {
            webcam.capture();
            return false;
        }
    </script>

    <style type="text/css">
        .fancy-green .ajax__tab_header {
            background: url(Imagen/blue_bg_Tab.gif) repeat-x;
            cursor: pointer;
        }

        .fancy-green .ajax__tab_hover .ajax__tab_outer, .fancy-green .ajax__tab_active .ajax__tab_outer {
            background: url(Imagen/blue_left_tab.gif) no-repeat left top;
        }

        .fancy-green .ajax__tab_hover .ajax__tab_inner, .fancy-green .ajax__tab_active .ajax__tab_inner {
            background: url(Imagen/blue_right_Tab.gif) no-repeat right top;
        }

        .fancy .ajax__tab_header {
            font-size: 13px;
            font-weight: bold;
            color: #000;
            font-family: sans-serif;
        }

            .fancy .ajax__tab_active .ajax__tab_outer, .fancy .ajax__tab_header .ajax__tab_outer, .fancy .ajax__tab_hover .ajax__tab_outer {
                height: 46px;
            }

            .fancy .ajax__tab_active .ajax__tab_inner, .fancy .ajax__tab_header .ajax__tab_inner, .fancy .ajax__tab_hover .ajax__tab_inner {
                height: 46px;
                margin-left: 16px; /* offset the width of the left image */
            }

            .fancy .ajax__tab_active .ajax__tab_tab, .fancy .ajax__tab_hover .ajax__tab_tab, .fancy .ajax__tab_header .ajax__tab_tab {
                margin: 16px 16px 0px 0px;
            }

        .fancy .ajax__tab_hover .ajax__tab_tab, .fancy .ajax__tab_active .ajax__tab_tab {
            color: #fff;
        }

        .fancy .ajax__tab_body {
            font-family: Arial;
            font-size: 10pt;
            border-top: 0;
            border: 1px solid #999999;
            padding: 8px;
            background-color: #ffffff;
        }

        .auto-style2 {
            width: 307px;
        }

        .auto-style4 {
            height: 15px;
        }

        .auto-style32 {
            height: 33px;
            margin-left: 40px;
        }

        .fancy-green {
        }

        .fancy-green {
        }

        .fancy-green
        {}
        .auto-style33
        {
            width: 739px;
        }
        .auto-style34
        {
            width: 500px;
        }
        .auto-style39
        {
            height: 15px;
            width: 198px;
        }
        .auto-style41
        {
            width: 717px;
        }
        .fancy-green
        {}
        .fancy-green
        {}
        .fancy-green
        {}
        .auto-style44
        {
            width: 330px;
        }
        .auto-style45
        {
            height: 36px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="height: 28px">
        <asp:Panel ID="Panel4" runat="server" Height="27px">
            <asp:Image ID="Image2" runat="server" ImageUrl="~/Módulos/Administración/Imagen/FactMat.png" Width="275px" />
        </asp:Panel>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
            <asp:Panel ID="Panel3" runat="server">
                <table align="center" style="background-color: #E8EBF7; border-radius: 10px; filter: alpha(opacity=50);">
                    <tr>
                        <td class="auto-style4"></td>
                        <td align="center" class="auto-style4"></td>
                        <td align="left" class="auto-style2" colspan="3"></td>
                    </tr>
                    <tr>
                        <td class="auto-style4"></td>
                        <td align="center" class="auto-style4">Código del Cliente:</td>
                        <td align="left" class="auto-style2" colspan="3">
                            <asp:TextBox ID="txt_CodCliente" runat="server" MaxLength="48" ReadOnly="True" Width="50px" BackColor="#CCCCCC" Height="22px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="auto-style4">
                            <br />
                            <br />
                        </td>
                        <td align="right" class="auto-style4">Identificación: </td>
                        <td class="auto-style2" colspan="3">
                            <asp:TextBox ID="txt_Identificacion" runat="server" MaxLength="10" ReadOnly="True" BackColor="#CCCCCC" Height="22px" Width="128px"></asp:TextBox>
                            <asp:ImageButton ID="imgbtn_Busqueda" runat="server" ImageUrl="~/Módulos/Administración/Imagen/icono_lupa.gif" OnClick="imgbtn_Busqueda_Click" CausesValidation="False" />
                        </td>
                    </tr>
                    <tr>
                        <td class="auto-style4">
                            <br />
                            <br />
                        </td>
                        <td align="right" class="auto-style4">Nombre:</td>
                        <td class="auto-style2" colspan="3">
                            <asp:TextBox ID="txt_Nombre" runat="server" MaxLength="48" ReadOnly="True" Width="128px" BackColor="#CCCCCC" Height="22px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="auto-style4">
                            <br />
                            <br />
                        </td>
                        <td align="right" class="auto-style4">Apellido:</td>
                        <td class="auto-style2" colspan="3">
                            <asp:TextBox ID="txt_Apellido" runat="server" MaxLength="10" ReadOnly="True" Width="128px" BackColor="#CCCCCC" Height="22px"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <br />
            <br />
            <br />
            <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" CssClass="fancy fancy-green" Width="951px" TabIndex="20" Height="834px" Enabled="False">
                <asp:TabPanel ID="TabPanel1" runat="server">
                    <HeaderTemplate>Facturación Venta y Servicios</HeaderTemplate>
                    <ContentTemplate>
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <asp:Panel ID="Panel2" runat="server" Height="758px" Width="770px">
                                    <table align="center" style="background-color: #E8EBF7; border-radius: 10px; filter: alpha(opacity=50); " class="auto-style33">
                                        <tr>
                                            <td align="left" class="auto-style41" colspan="3">
                                                <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="Red" HeaderText="Se han producido los siguientes errores:" />
                                                <h2 style="color: darkblue">Facturación</h2>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="auto-style45" colspan="3">
                                                Factura:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                <asp:TextBox ID="txt_factura" runat="server" BackColor="#CCCCCC" Height="22px" Width="128px" ReadOnly="True"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="3">
                                                Fecha:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                <asp:TextBox ID="txt_Fecha" runat="server" BackColor="#CCCCCC" CssClass="DropDownListcompleto" Height="22px" ReadOnly="True" TabIndex="1" Width="128px"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="3">
                                                Descripción:
                                                <asp:TextBox ID="txt_Descripcion" runat="server" CssClass="DropDownListcompleto" MaxLength="48" TabIndex="2" Width="316px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txt_Descripcion" Enabled="False" ErrorMessage="Digite una descripcion" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                                <br />
                                                </td>
                                        </tr>
                                        <tr>
                                            <td class="auto-style41" colspan="3">
                                                <asp:GridView ID="gv_Factura" runat="server" Height="182px"
                                                    Width="600px" Style="margin-left: 0px" BackColor="White"
                                                    BorderColor="#999999" BorderStyle="Dashed" BorderWidth="1px"
                                                    CellPadding="3" GridLines="Vertical" Enabled="False"
                                                    OnRowDeleting="gv_Factura_RowDeleting" AllowPaging="True" PageSize="6" OnRowCommand="gv_Factura_RowCommand">
                                                    <AlternatingRowStyle BackColor="#DCDCDC" />
                                                    <Columns>
                                                        <asp:CommandField ShowSelectButton="True" />
                                                    </Columns>
                                                    <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                                                    <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
                                                    <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                                                    <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
                                                    <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                                                    <SortedAscendingCellStyle BackColor="#F1F1F1" />
                                                    <SortedAscendingHeaderStyle BackColor="#0000A9" />
                                                    <SortedDescendingCellStyle BackColor="#CAC9C9" />
                                                    <SortedDescendingHeaderStyle BackColor="#000065" />
                                                </asp:GridView>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left" class="auto-style41" colspan="3">
                                                <h2 style="color: darkblue">Artículo</h2>
                                                <asp:Label ID="lbl_mensaje" runat="server" BorderColor="Black" ForeColor="Red"></asp:Label>
                                                <asp:Label ID="lbl_mensaje1" runat="server" BorderColor="Black" ForeColor="Green"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="auto-style34" rowspan="4">
                                                <asp:Panel ID="Panel9" runat="server" GroupingText="Informacion del Articulo o Matrícula" Height="205px" Style="margin-bottom: 0px" Width="500px" BorderColor="Blue">
                                                    <table style="background-color: #E8EBF7; border-radius: 10px; filter: alpha(opacity=50);">
                                                        <tr>
                                                            <td class="auto-style14" colspan="2">
                                                                <asp:Label ID="Label14" runat="server" Text="Articulo:"></asp:Label><asp:TextBox ID="txt_id_articulo" runat="server" BackColor="#CCCCCC" ReadOnly="True" Width="50px" CssClass="DropDownListcompleto" Height="22px"></asp:TextBox><asp:TextBox ID="txt_cod_articulo" runat="server" BackColor="#CCCCCC" Width="50px" ReadOnly="True" TabIndex="4" CssClass="DropDownListcompleto" Height="22px"></asp:TextBox></td>
                                                            <td class="auto-style14" colspan="2" style="margin-left: 40px">
                                                                <asp:ImageButton ID="imgbtn_buscar_producto" runat="server" Height="26px" ImageUrl="~/Módulos/Inventarios/Imagenes/icono_lupa.gif" OnClick="imgbtn_buscar_producto_Click" CausesValidation="False" /><asp:TextBox ID="txt_NombreArt" runat="server" Width="159px" ReadOnly="True" TabIndex="4" CssClass="DropDownListcompleto" BackColor="#CCCCCC" Height="22px"></asp:TextBox></td>
                                                        </tr>
                                                        <tr>
                                                            <td class="auto-style24">&nbsp;</td>
                                                            <td class="auto-style23">&nbsp;</td>
                                                            <td>&nbsp;</td>
                                                            <td>&nbsp;</td>
                                                        </tr>
                                                        <tr>
                                                            <td class="auto-style24">
                                                                <asp:Label ID="Label18" runat="server" Text="Cantidad:"></asp:Label></td>
                                                            <td class="auto-style23">
                                                                <asp:TextBox ID="txt_Cant" runat="server" Height="22px" MaxLength="3" Width="71px" Enabled="False"></asp:TextBox>
                                                                <asp:RequiredFieldValidator
                                                                    ID="RequiredFieldValidator6"
                                                                    runat="server"
                                                                    ControlToValidate="txt_Cant"
                                                                    ErrorMessage="Digite un valor de 0 a 100 en cantidad"
                                                                    ForeColor="Red"
                                                                    SetFocusOnError="True">*
                                                                </asp:RequiredFieldValidator><asp:CompareValidator
                                                                    ID="CompareValidator2"
                                                                    runat="server"
                                                                    ControlToValidate="txt_Cant"
                                                                    ErrorMessage="Digite solo numeros en cantidad"
                                                                    ForeColor="Red"
                                                                    Operator="DataTypeCheck"
                                                                    SetFocusOnError="True"
                                                                    Type="Integer">*
                                                                </asp:CompareValidator></td>
                                                            <td>
                                                                <asp:Label ID="Label13" runat="server" Text="Impuesto:"></asp:Label></td>
                                                            <td>
                                                                <asp:TextBox ID="txt_impuesto" runat="server" AutoPostBack="True" BackColor="#CCCCCC" Height="22px" ReadOnly="True" Width="71px" CssClass="DropDownListcompleto"></asp:TextBox>                                                             
                                                                %</td>
                                                        </tr>
                                                        <tr>
                                                            <td class="auto-style32">
                                                                <asp:Label ID="Label17" runat="server" Text="Descuento:"></asp:Label></td>
                                                            <td class="auto-style32">
                                                                <asp:TextBox ID="txt_Desc" runat="server" Height="22px" MaxLength="2" Width="71px" Enabled="False"></asp:TextBox>
                                                                %<asp:RequiredFieldValidator
                                                                    ID="RequiredFieldValidator7"
                                                                    runat="server"
                                                                    ControlToValidate="txt_Desc"
                                                                    ErrorMessage="Digite el descuento"
                                                                    ForeColor="Red"
                                                                    SetFocusOnError="True">*
                                                                </asp:RequiredFieldValidator>
                                                                <asp:RangeValidator
                                                                    ID="RangeValidator3"
                                                                    runat="server"
                                                                    ControlToValidate="txt_Desc"
                                                                    ErrorMessage="Digite numeros en intervalo de 0-50 en Descuento"
                                                                    ForeColor="Red"
                                                                    MaximumValue="50"
                                                                    MinimumValue="0"
                                                                    SetFocusOnError="True" Type="Double">*
                                                                </asp:RangeValidator></td>
                                                            <td class="auto-style32">
                                                                <asp:Label ID="Label12" runat="server" Text="Precio:"></asp:Label></td>
                                                            <td class="auto-style32">
                                                                <asp:TextBox ID="txt_precio" runat="server" BackColor="#CCCCCC" Height="22px" ReadOnly="True" Width="71px" CssClass="DropDownListcompleto"></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td align="center" class="DropDownListcompleto" colspan="4">
                                                                <asp:Button ID="btn_Nueva" runat="server" CausesValidation="False" Height="26px" Text="Nueva" Width="62px" OnClick="btn_Nueva_Click" /><asp:Button ID="btn_agregar" runat="server" Enabled="False" Text="Agregar" OnClick="btn_agregar_Click" /><asp:Button ID="btn_actualizar" runat="server" Enabled="False" Style="margin-bottom: 0px" Text="Actualizar" OnClick="btn_actualizar_Click" /><asp:Button ID="btn_guardar" runat="server" Enabled="False" Text="Guardar" OnClick="btn_guardar_Click" /><asp:Button ID="btn_borrar" runat="server" CausesValidation="False" Enabled="False" Text="Borrar" OnClick="btn_borrar_Click" /></td>
                                                        </tr>
                                                    </table>
                                                    <br />
                                                </asp:Panel>
                                            </td>
                                            <td class="auto-style39">Sub Total:</td>
                                            <td class="auto-style44">
                                                <asp:TextBox runat="server" AutoPostBack="True" MaxLength="10" Height="22px" Width="128px" ID="txt_SubTotal" BackColor="#CCCCCC" ReadOnly="True"></asp:TextBox><asp:MaskedEditExtender ID="MaskedEditExtender8" runat="server"
                                                    TargetControlID="txt_SubTotal"
                                                    Mask="99999999.99"
                                                    MaskType="Number"
                                                    InputDirection="RightToLeft"
                                                    Filtered="."
                                                    ErrorTooltipEnabled="True" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="auto-style39">Descuento:</td>
                                            <td class="auto-style44">
                                                <asp:TextBox runat="server" AutoPostBack="True" MaxLength="10" Height="22px" Width="128px" ID="txt_DescuentoTotal" BackColor="#CCCCCC" ReadOnly="True"></asp:TextBox><asp:MaskedEditExtender ID="MaskedEditExtender1" runat="server"
                                                    TargetControlID="txt_DescuentoTotal"
                                                    Mask="99999.99"
                                                    MaskType="Number"
                                                    InputDirection="RightToLeft"
                                                    Filtered="."
                                                    ErrorTooltipEnabled="True" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="auto-style39">I.V:</td>
                                            <td class="auto-style44">
                                                <asp:TextBox runat="server" AutoPostBack="True" MaxLength="20" Height="22px" Width="128px" ID="txt_IV" BackColor="#CCCCCC" ReadOnly="True"></asp:TextBox><asp:MaskedEditExtender ID="MaskedEditExtender2" runat="server"
                                                    TargetControlID="txt_IV"
                                                    Mask="999.99"
                                                    MaskType="Number"
                                                    InputDirection="RightToLeft"
                                                    Filtered="."
                                                    ErrorTooltipEnabled="True" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="auto-style39">Total:</td>
                                            <td class="auto-style44">
                                                <asp:TextBox runat="server" AutoPostBack="True" MaxLength="10" Height="22px" Width="128px" ID="txt_Total" BackColor="#CCCCCC" ReadOnly="True"></asp:TextBox><asp:MaskedEditExtender ID="MaskedEditExtender3" runat="server"
                                                    TargetControlID="txt_Total"
                                                    Mask="99999999.99"
                                                    MaskType="Number"
                                                    InputDirection="RightToLeft"
                                                    Filtered="."
                                                    ErrorTooltipEnabled="True" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" />
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </ContentTemplate>
                </asp:TabPanel>
            </asp:TabContainer>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
